package com.sayimo.maker.activity.service.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sayimo.framework.exception.DaoException;
import com.sayimo.framework.exception.ServiceException;
import com.sayimo.maker.activity.dao.BaseCutDao;
import com.sayimo.maker.activity.service.BaseCutService;
import com.sayimo.maker.activity.vo.BaseCut;
import com.sayimo.maker.commons.Constant;



/**
 * @Copyright (c) 2016 广东省尚一互联网有限公司
 * @Project: schoolmallapi-2.0
 * @ClassName: BaseCutServiceImpl.java
 * @Description: 砍价
 * @Author:	tanxin
 * @Date:2016年10月19日,上午11:39:24
 * @Version 1.0.0
 */
@Service(value="baseCutService")
public class BaseCutServiceImpl implements BaseCutService{
	
	@Autowired
	private BaseCutDao baseCutDao;
	
	/**
	 * 根据标示符查询活动信息
	 */
	@Override
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map selectBaseCutByIdentifier(String identifier)
			throws ServiceException {
		Map resultMap = new HashMap();
		Map map=new HashMap();
		map.put("identifier", identifier);
		List<BaseCut> list=new ArrayList<BaseCut>();
		try {
			list=baseCutDao.selectBaseCutByIdentifier(map);
			resultMap.put(Constant.DATA, list);
			resultMap.put(Constant.STATUS, Constant.STATUS_SUCCESS);
		} catch (DaoException e) {
			e.printStackTrace();
		}
		return resultMap;
	}
}
